import Vue from 'vue'
// 国际化（翻译）
import VueI18n from 'vue-i18n'
import enLocale from 'element-ui/lib/locale/lang/en'
import zhLocale from 'element-ui/lib/locale/lang/zh-CN'
import customZH from './zh'
import customEN from './en'
Vue.use(VueI18n)
const messages = {
  zh: {
    morning: '早安',
    goodday: '开心每一天',
    ...zhLocale,
    ...customZH
  },
  en: {
    morning: 'good morning',
    goodday: 'have a good day',
    ...enLocale,
    ...customEN
  }
}
export default new VueI18n({
  locale: localStorage.getItem('lang') || 'zh', // 设置地区
  // locale: 'ch', // 设置地区
  messages // 设置地区信息
})
